Skip to content

[fix][client] handle subscriptionRolePrefix properly #416

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 22, 2025

Conversation

candu
Copy link
Contributor

@candu candu commented May 21, 2025

Fixes #415

Motivation

At my current employer, we have a centrally-managed Pulsar cluster that requires use of a pre-assigned subscriptionRolePrefix for your client when creating a reader.

As per docs, you should be able to do this with:

client.createReader({
  topic,
  startMessageId: Pulsar.MessageId.earliest(),
  subscriptionRolePrefix: subscriptionPrefix,
});

However, this bug prevents that from working correctly.

Modifications

Small change in ReaderConfig.cc to call the correct PULSAR_PUBLIC function.

Verifying this change

  • Make sure that the change passes the CI checks.

This change is a trivial rework / code cleanup without any test coverage. That said: I did test that, by using my patched client, I can create a reader in our internal setup described above. (Without the patch, it fails.)

(Due to NDA, I can't describe that setup in more detail, sadly.)

Documentation

  • doc-required
    (Your PR needs to update docs and you will update later)

  • doc-not-needed
    (Please explain why)

  • doc
    (Your PR contains doc changes)

  • doc-complete
    (Docs have been already added)

Docs are not needed: this fixes a feature that is already documented, but which did not previously work as intended.

Copy link
Member

@shibd shibd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch!

@shibd shibd merged commit 8b2cfd3 into apache:master May 22, 2025
12 checks passed
@shibd shibd added this to the 1.14.0 milestone May 26, 2025
shibd pushed a commit that referenced this pull request May 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

subscriptionRolePrefix is not handled properly in ReaderConfig
2 participants